import request from '@/utils/request'

// 查询球场列表
export function listStadium(query) {
  return request({
    url: '/football/stadium/list',
    method: 'get',
    params: query
  })
}

// 查询球场详细
export function getStadium(id) {
  return request({
    url: '/football/stadium/' + id,
    method: 'get'
  })
}

// 新增球场
export function addStadium(data) {
  return request({
    url: '/football/stadium',
    method: 'post',
    data: data
  })
}

// 修改球场
export function updateStadium(data) {
  return request({
    url: '/football/stadium',
    method: 'put',
    data: data
  })
}

// 删除球场
export function delStadium(id) {
  return request({
    url: '/football/stadium/' + id,
    method: 'delete'
  })
}


// 通过关键词收索位置
export function suggestion(keyword,region) {
  return request({
    url: '/map/suggestion',
    method: 'get',
    params:{
      'keyword':keyword,
      'region':region
    }
  })
}


// 坐标解析
export function geocoder(idlocation) {
  return request({
    url: '/map/geocoder',
    method: 'get',
    params:{
      'location':idlocation
    }
  })
}